<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/inc/taglib.inc"%>
<%@ include file="/WEB-INF/inc/script.inc"%>
<!DOCTYPE html>
<html>

<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="${base}">
<title>中金通 | 设备列表</title>

<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="font-awesome/css/font-awesome.css" rel="stylesheet">
<link href="js/plugins/jquery-ui/jquery-ui.min.css" rel="stylesheet">

<!-- FooTable -->
<!-- <link href="css/plugins/footable/footable.core.css" rel="stylesheet"> -->
<!-- Data Tables -->
<link href="css/plugins/dataTables/dataTables.bootstrap.css"
	rel="stylesheet">
<link href="css/plugins/dataTables/dataTables.responsive.css"
	rel="stylesheet">
<link href="css/plugins/dataTables/dataTables.tableTools.min.css"
	rel="stylesheet">
<link href="css/animate.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">

<link href="css/plugins/datapicker/datepicker3.css" rel="stylesheet">
<style>
        .blueimp-gallery {
        	width:1200px;
        	height:800px;
            margin: 0px;
        }
        .detail-content{
        	font-size:15px;
        }
        .col-md-3{
  			padding-bottom: 20px;
        }
        .detail-title{
        	font-size:15px;
        	font-weight:bold;
        }
        .hr-line-dash{
	  		color: #ffffff;
	  		background-color: #ffffff;
	  		height: 1px;
	  		margin: 20px 0;
  		}
		.form-control[readonly]{
			background-color: #fff;
			opacity: 1;
		}
		.ui-autocomplete {
			z-index: 11111;
		}
    </style>
</head>

<body>

	<div id="wrapper">

		<!-- 左侧菜单 -->
		<jsp:include page="/WEB-INF/jsp/common/main-menu.jsp"></jsp:include>

		<div id="page-wrapper" class="gray-bg">
			<div class="row border-bottom">
				<!-- 头部工具栏区 -->
				<jsp:include page="/WEB-INF/jsp/common/main-header.jsp"></jsp:include>
			</div>
			<div class="row wrapper border-bottom white-bg page-heading">
				<div class="col-lg-10">
					<h2>设备管理</h2>
					<ol class="breadcrumb">
						<li><a href="common/platform">Home</a></li>
						<li><a href="device/list">设备管理</a></li>
						<li class="active"><strong>设备列表</strong></li>
					</ol>
				</div>
				<div class="col-lg-2"></div>
			</div>
			<input type="text" id="org_id" class="hidden" value="${sessionScope.security_context_user.orgId}"/>
			<div class="row" style="margin-top: 10px;">
				<div class="col-md-12">
					<div class="tabs-container">
						<ul class="nav nav-tabs">
							<li class="active"><a href="device/list"> 设备列表 </a></li>
						</ul>
						<div class="tab-content">
							<div class="tab-pane active">
								<div class="panel-body">
									<div
										class="wrapper wrapper-content animated fadeInRight ecommerce">
											<div class="ibox-content m-b-sm">
												<form id="queryForm" method="post">
													<div class="row">
														<div class="col-sm-4">
															<div class="form-group">
																<label class="control-label" for="orderId">PAD编号</label>
																<input type="text" id="orderId" name="iSerialNumber" value=""
																	placeholder="PAD编号" class="form-control">
															</div>
														</div>
														<div class="col-sm-4">
															<div class="form-group">
																<label class="control-label" for="investorName">POS机编号</label> <input
																	type="text" id="name" name="pSerialNumber" value=""
																	placeholder="POS机编号" class="form-control">
															</div>
														</div>
														<div class="col-sm-4">
															<div class="form-group">
																<label class="control-label" for="investorMobile">理财师工号</label>
																<input type="text" id="mobile" name="employeeNo" value=""
																	placeholder="理财师工号" class="form-control">
															</div>
														</div>
													</div>
													<div class="row">
														<div class="col-sm-4">
															<div class="form-group">
																<label class="control-label" for="date_added">到期日期</label>
																<div class="input-group date">
																	<span class="input-group-addon"><i
																		class="fa fa-calendar"></i></span><input name="endStart" id="endStart"
																		placeholder="到期日期开始" type="text" class="form-control" value="" readonly="readonly">
																</div>
															</div>
														</div>
														<div class="col-sm-4">
															<label class="control-label" for="date_added">&nbsp;</label>
															<div class="form-group">
																<div class="input-group date">
																	<span class="input-group-addon"><i
																		class="fa fa-calendar"></i></span><input name="endEnd" id="endEnd"
																		placeholder="到期时间结束" type="text" class="form-control" value="" readonly="readonly">
																</div>
															</div>
														</div>
														<div class="col-sm-4">
															<div class="form-group">
																<label class="control-label" for="allocated">是否已分配</label>
																	<select id="status" name="allocated" 
																		class="form-control m-b" tabindex="2">
																		<option value="" selected="selected">所有</option>
																		<option value="0">未分配</option>
																		<option value="1">已分配</option>
																	</select>
															</div>
														</div>
													</div>
													<div class="row">
														<div class="col-sm-4 col-sm-offset-2">
					                                        <button class="btn btn-outline btn-default pull-right m-t-n-xs" id="cancleQuery" type="reset">重 置</button>
					                                        <div class="pull-right">&nbsp;&nbsp;&nbsp;</div>
					                                        <button class="btn btn-primary pull-right m-t-n-xs" id="queryBtn" type="button">查 询</button>
					                                    </div>
													</div>
												</form>
											</div>
										<div class="row">
											<div class="col-lg-12">
												<div class="ibox float-e-margins">
													<div class="ibox-content">
														<table id="deviceEditable"
															class="table table-striped table-bordered table-hover">
															<thead>
																<tr>
																	<th>PAD编号</th>
																	<th>POS机编号</th>
																	<th>Sim卡号</th>
																	<th>到期日期</th>
																	<th>理财师</th>
																	<th>分配日期</th>
																	<th>是否已分配</th>
																	<th style="background-color: white;">操作</th>
																</tr>
															</thead>
															<tbody>
															</tbody>

														</table>


													</div>
												</div>
											</div>
										</div>

									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<!-- 底部版权 -->
			<jsp:include page="/WEB-INF/jsp/common/main-footer.jsp"></jsp:include>
		</div>
		<!-- 分配页面 -->
		<div class="modal inmodal" id="distributionModal" tabindex="-1" role="dialog"
			aria-hidden="true">
			<div class="modal-dialog modal-md">
				<div class="modal-content animated fadeIn">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal">
							<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
						</button>
						<h4 class="modal-title">分配设备</h4>
					</div>
					<div class="modal-body">
						<div id="distributionBody"></div>
						<script id="distributionTemplate" type="text/x-jquery-tmpl">
						<form action="" class="ibox-content p-xl" id="distributionForm">
                            <div class="row">
									<div class="form-group">
										<input type="text" name="id" class="hidden" value="{{= id}}">
										<input type="text" name="orgId" class="hidden" value="{{= orgId}}">
										<div class="col-sm-3">
										<label class="detail-title">POS机编号:</label>
										</div>
										<div class="col-sm-3">
										<span class="detail-content">{{= pSerialNumber}}</span>
										</div>
									</div>
                            </div>
							<br>
							<div class="row">
									<div class="form-group">
										<div class="col-sm-3">
										<label class="detail-title">PAD编号:</label>
										</div>
										<div class="col-sm-3">
										<span class="detail-content">{{= iSerialNumber}}</span>
										</div>
									</div>
							</div>
							<br>
							<div class="row">
									<div class="form-group">
										<div class="col-sm-3">
										<label class="detail-title">理财师工号:</label>
										</div>
										<div class="col-sm-6">
										<input type="text" id="employeeNoSearch" placeholder="请输入员工工号" class="ui-autocomplete-input form-control" autocomplete="off"></input>
										<input type="text" id="employeeNo" name="employeeNo" style="display:none;" class="ui-autocomplete-input form-control" autocomplete="off"></input>
										</div>
									</div>
							</div>
                        </form>
						</script>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-white" data-dismiss="modal">取消</button>
						<button type="submit" class="btn btn-primary" id="distributionConfirm">确认</button>
					</div>
				</div>
			</div>
		</div>
	</div>



	<!-- Mainly scripts -->
	<script src="js/jquery-2.1.1.js"></script>
	<script src="js/bootstrap.min.js"></script>
	<script src="js/plugins/metisMenu/jquery.metisMenu.js"></script>
	<script src="js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
	<script src="js/plugins/jeditable/jquery.jeditable.js"></script>
	<script src="js/jquery.serialize-object.min.js" type="text/javascript"></script>
	<script src="js/plugins/validate/jquery.validate.min.js" type="text/javascript"></script>
	<script src="js/plugins/validate/jquery.validate.messages-zh_CN.js" type="text/javascript"></script>

	<!-- Data Tables -->
	<script src="js/plugins/dataTables/jquery.dataTables.js"></script>
	<script src="js/plugins/dataTables/dataTables.bootstrap.js"></script>
	<script src="js/plugins/dataTables/dataTables.responsive.js"></script>
	<script src="js/plugins/dataTables/dataTables.tableTools.min.js"></script>

	<!-- Custom and plugin javascript -->
	<script src="js/inspinia.js"></script>
	<script src="js/plugins/pace/pace.min.js"></script>
	<script src="js/plugins/jquery-ui/jquery-ui.min.js"></script>
	<script src="js/plugins/bootbox/bootbox.min.js" type="text/javascript"></script>

	<!-- Data picker -->
	<script src="js/plugins/datapicker/bootstrap-datepicker.js"></script>

	<!-- Page-Level Scripts -->
	<script src="js/jquery.tmpl.min.js"></script>
	<script src="js/device/device-module.js?v=${jsVersion}"></script>
	<script>
		$(document).ready(function() {
			DeviceModule.init();
			$('#endStart').datepicker({
				todayBtn : "linked",
				keyboardNavigation : true,
				forceParse : false,
				calendarWeeks : true,
				autoclose : true,
				format: "yyyy-mm-dd",
				language: 'cn',
			});

			$('#endEnd').datepicker({
				todayBtn : "linked",
				keyboardNavigation : true,
				forceParse : false,
				calendarWeeks : true,
				autoclose : true,
				format: "yyyy-mm-dd",
				language: 'cn',
			});

		});
	</script>

</body>

</html>
